package demo4;
/*
当时用一个对象类型（也就是类）作为方法的返回值时，返回值其实就是对象的地址值

 */
public class PhoneReturn {
    public static void main(String[] args) {
        Phone two = getPhone();
        System.out.println("品牌："+two.brand+"   "+"价格："+two.price+"   "+"颜色："+two.color);

    }

    public static Phone getPhone(){
        Phone one = new Phone();
        one.brand = "小米";
        one.price = 4699.0;
        one.color = "月牙白";
        return one;
    }
}
